<extend name="common:commonSimpleTemplate" />

<block name="main_content">
<div class="main-content">
	<div class="breadcrumbs" id="breadcrumbs">
		<ul class="breadcrumb">
			<li><i class="icon-home home-icon"></i> <a href="#">首页</a> <span
				class="divider"> <i class="icon-angle-right arrow-icon"></i>
			</span></li>
			<li class="active">订单详情</li>
		</ul>
		<!--.breadcrumb-->

	</div>

	<div class="page-content">
		<div class="page-header position-relative">
			<h1>订单详情</h1>
		</div>
		<!--/.page-header-->

		<div class="row-fluid">
			<div class="span12">
				<div class="alert alert-block alert-success">
					订单编号：<a href="javascript:void(0);">{$order_info_en.order_id}</a>
					<div style="float: right; margin-bottom: 10px; margin-top: -10px;">
					
						<if condition="!($order_info_en.invoice_status eq '1' || $order_info_en.invoice_status eq '15')">
					    <a target='_blank' href="/Invoice/invoiceitem?order_id={$order_info_en.order_id}">查看发票明细</a>
					    </if>
					    
					    <if condition="$order_info_en.order_status eq '35'">
					    <if condition="($order_info_en.invoice_status eq '1' or $order_info_en.invoice_status eq '14')">
						<button id="paperInvoice" style="width:80px;height:40px;font-size:10px;" class="btn btn-primary">纸质普通</button>
						<button id="specialPaperInvoice" style="width:80px;height:40px;font-size:10px;" class="btn btn-primary" >纸质专票</button>
						<button id="electronicInvoice" style="width:80px;height:40px;font-size: 10px;" class="btn btn-primary" value="电子" id="electronicInvoice">电子</button>
						</if>
						<else /> <span>订单非完成状态或者已导出纸质</span>
						</if>
						
						<if condition="($order_info_en.invoice_status eq '12')">
						     <button id="redInvoice" style="width:80px;height:40px;font-size: 10px;" class="btn btn-primary" value="冲红" id="electronicInvoice">冲红</button>
						     <select id="redReason" >
						         <option value="">--请选择原因--</option>
								 <option value="2">退货，退款成功</option>
								 <option value="3">电子换纸质</option>
								 <option value="4">其他(包含更改发票内容)</option>
								 </select>
						<else /> 
						</if>
				  	</div>
				</div>
			</div>
			<div class="widget-body">



				<div class="slimScrollDiv">
					<div class="dialogs" style="overflow: hidden; width: auto;">

						<div class="itemdiv dialogdiv">

							<div class="body">
								<div class="time"></div>

								<div class="name"></div>
								<div class="text form-horizontal">
									<table>

										<tr>
											<td>
												<div class="control-group">
													<label style="padding-top: 5px; float: left;"
														for="form-field-1">第三方订单编号：</label> <input type="text" id="thirdOrderId"
														style="height: 20px; width: 200px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: none; border-right-style: none; border-bottom-style: solid; border-left-style: none; border-top-color: #666666; border-right-color: #666666; border-bottom-color: #666666; border-left-color: #666666;"
														value="{$order_info_en.third_order_id}">
												</div>
												
												<div class="control-group" style="display:none">
													<label style="padding-top: 5px; float: left;"
														for="form-field-1">发票状态：</label> <input type="text" id="invoice_status_check"
														style="height: 20px; width: 200px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: none; border-right-style: none; border-bottom-style: solid; border-left-style: none; border-top-color: #666666; border-right-color: #666666; border-bottom-color: #666666; border-left-color: #666666;"
														value="{$order_info_en.invoice_status}">
													<label style="padding-top: 5px; float: left;"
														for="form-field-1">返现状态：</label> <input type="text" id="cash_back_status"
														style="height: 20px; width: 200px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: none; border-right-style: none; border-bottom-style: solid; border-left-style: none; border-top-color: #666666; border-right-color: #666666; border-bottom-color: #666666; border-left-color: #666666;"
														value="{$order_info_en.cash_back_status}">
												     <label style="padding-top: 5px; float: left;"
														for="form-field-1">订单日期：</label> <input type="text" id="order_date"
														style="height: 20px; width: 200px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: none; border-right-style: none; border-bottom-style: solid; border-left-style: none; border-top-color: #666666; border-right-color: #666666; border-bottom-color: #666666; border-left-color: #666666;"
														value="{$order_info_en.order_date}">
													<label style="padding-top: 5px; float: left;"
														for="form-field-1">订单编号：</label> <input type="text" id="order_id"
														style="height: 20px; width: 200px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: none; border-right-style: none; border-bottom-style: solid; border-left-style: none; border-top-color: #666666; border-right-color: #666666; border-bottom-color: #666666; border-left-color: #666666;"
														value="{$order_info_en.order_id}">
														
												</div>
												
											</td>
											<td>
												<div class="control-group">
													<label style="padding-top: 5px; float: left;"
														for="form-field-1">订单类型（来源）：</label><input type="text"
														style="height: 20px; width: 200px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: none; border-right-style: none; border-bottom-style: solid; border-left-style: none; border-top-color: #666666; border-right-color: #666666; border-bottom-color: #666666; border-left-color: #666666;"
														value="{$order_info_en.order_type_text}">
												</div>
											</td>
											<td>
												<div class="control-group">
													<label style="padding-top: 5px; float: left;"
														for="form-field-1">订单状态：</label><input type="text"
														style="height: 20px; width: 200px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: none; border-right-style: none; border-bottom-style: solid; border-left-style: none; border-top-color: #666666; border-right-color: #666666; border-bottom-color: #666666; border-left-color: #666666;"
														value="{$order_info_en.order_status_text}">
												</div>
											</td>
										</tr>
										<tr>
											<td>
												<div class="control-group">
													<label style="padding-top: 5px; float: left;"
														for="form-field-1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;发票类型：</label>
													<input type="text"
														style="height: 20px; width: 200px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: none; border-right-style: none; border-bottom-style: solid; border-left-style: none; border-top-color: #666666; border-right-color: #666666; border-bottom-color: #666666; border-left-color: #666666;"
														value="{$order_info_en.invoice_kind_text}">
												</div>
												<div class="control-group" style="display:none">
													<input type="text" id="invoice_kind"
														style="height: 20px; width: 200px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: none; border-right-style: none; border-bottom-style: solid; border-left-style: none; border-top-color: #666666; border-right-color: #666666; border-bottom-color: #666666; border-left-color: #666666;"
														value="{$order_info_en.invoice_kind}">
												</div>
												
											</td>
											<td>
												<div class="control-group">
													<label style="padding-top: 5px; float: left;"
														for="form-field-1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;发票抬头：</label><input
														type="text" id="invoiceTitle" 
														style="height: 20px; width: 140px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: none; border-right-style: none; border-bottom-style: solid; border-left-style: none; border-top-color: #666666; border-right-color: #666666; border-bottom-color: #666666; border-left-color: #666666;"
														value="{$order_info_en.invoice_title}">
														
														
												<if condition="$order_info_en.invoice_status eq '1' or $order_info_en.invoice_status eq '14'">
												<button id="updateOrderInvoiceTitle"  class="btn btn-primary" style="width:60px;height:40px;font-size:10px;">修改</button>
												</if>				
												</div>
											</td>
											<td>
												<div class="control-group">
													<label style="padding-top: 5px; float: left;"
														for="form-field-1">&nbsp;&nbsp;&nbsp;发票金额：</label><input
														type="text"
														style="height: 20px; width: 200px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: none; border-right-style: none; border-bottom-style: solid; border-left-style: none; border-top-color: #666666; border-right-color: #666666; border-bottom-color: #666666; border-left-color: #666666;"
														value="{$order_info_en.invoice_amount}">
												</div>
											</td>
										</tr>
									</table>

								</div>
							</div>
						</div>

					</div>
				</div>





				<div class="slimScrollDiv">
					<div class="dialogs" style="overflow: hidden; width: auto;">

						<div class="itemdiv dialogdiv">
							<div class="body">
								<div class="time"></div>

								<div class="name"></div>
								<div class="text form-horizontal">
									<div class="row-fluid">
										<div class="span6" style="width: 30%; padding-right: 100px;">
											<ul style="list-style-type: none; font-size: 18px;">
												<li class="text-error" style="line-height: 25px;font-size: 14px;"><small
													style="color: #393939">商品总金额：</small>
													￥{$order_info_en.goods_amount}</li>
												<li class="text-error" style="line-height: 25px;font-size: 14px;"><small
													style="color: #393939">运&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;费：</small>
													￥{$order_info_en.freight}</li>
												<li class="text-error" style="line-height: 25px;font-size: 14px;"><small
													style="color: #393939">天&nbsp;&nbsp;猫&nbsp;积&nbsp;分：</small>
													￥{$order_info_en.point_amount}</li>
												<li class="text-error" style="line-height: 25px;font-size: 14px;"><small
													style="color: #393939">订单总金额：</small>
													￥{$order_info_en.payment_amount}</li>
											</ul>
										</div>
										<div class="span6" style="width: 35%;">
											<ul style="list-style-type: none; font-size: 18px;">


												<if condition="!empty($lst_order_discount_en)">
												<li class="text-success" style="line-height: 25px;font-size: 14px;"><small
													style="color: #393939">折扣金额：</small></li>
												</if>
												<volist name="lst_order_discount_en" id="discounts">

												<li class="text-success" style="line-height: 25px;font-size: 14px;margin-left:10px;">
													￥{$discounts.discount_amount}({$discounts.discount_desc})</li>
												</volist>
											</ul>
										</div>

									</div>
								</div>

							</div>
						</div>

					</div>
				</div>


				<div class="slimScrollDiv">
					<div class="dialogs" style="overflow: hidden; width: auto;">
						<div class="itemdiv dialogdiv">
							<div class="body">
								<div class="time"></div>
								<div class="name"></div>
								<div class="text form-horizontal">
									<table>
										<tr>
											<td>
												<div class="control-group">
													<label style="padding-top: 5px; float: left;"
														for="form-field-1">&nbsp;&nbsp;&nbsp;&nbsp;用户编号：</label><input
														type="text"
														style="height: 20px; width: 200px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: none; border-right-style: none; border-bottom-style: solid; border-left-style: none; border-top-color: #666666; border-right-color: #666666; border-bottom-color: #666666; border-left-color: #666666;"
														value="{$order_info_en.user_id}">
												</div>
											</td>
											<td>
												<div class="control-group">
													<label style="padding-top: 5px; float: left;"
														for="form-field-1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用户名：</label><input
														type="text"
														style="height: 20px; width: 200px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: none; border-right-style: none; border-bottom-style: solid; border-left-style: none; border-top-color: #666666; border-right-color: #666666; border-bottom-color: #666666; border-left-color: #666666;"
														value="{$order_info_en.buyer_name}">
												</div>
											</td>
											<td>
												<div class="control-group">
													<label style="padding-top: 5px; float: left;"
														for="form-field-1">&nbsp;&nbsp;&nbsp;&nbsp;买家昵称：</label><input
														type="text"
														style="height: 20px; width: 200px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: none; border-right-style: none; border-bottom-style: solid; border-left-style: none; border-top-color: #666666; border-right-color: #666666; border-bottom-color: #666666; border-left-color: #666666;"
														value="{$order_info_en.buyer_nick}">
												</div>
											</td>
										</tr>
										<tr>
											<td>
												<div class="control-group">
													<label style="padding-top: 5px; float: left;"
														for="form-field-1">收货人姓名：</label> <input type="text"
														style="height: 20px; width: 200px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: none; border-right-style: none; border-bottom-style: solid; border-left-style: none; border-top-color: #666666; border-right-color: #666666; border-bottom-color: #666666; border-left-color: #666666;"
														value="{$order_info_en.consignee_name}">
												</div>
											</td>
											<td>
												<div class="control-group">
													<label style="padding-top: 5px; float: left;"
														for="form-field-1">收货人邮编：</label><input type="text"
														style="height: 20px; width: 200px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: none; border-right-style: none; border-bottom-style: solid; border-left-style: none; border-top-color: #666666; border-right-color: #666666; border-bottom-color: #666666; border-left-color: #666666;"
														value="{$order_info_en.consignee_zip}">
												</div>
											</td>
												<td>
												<div class="control-group">
													<label style="padding-top: 5px; float: left;"
														for="form-field-1">收货人电话</label><input type="text"
														style="height: 20px; width: 200px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: none; border-right-style: none; border-bottom-style: solid; border-left-style: none; border-top-color: #666666; border-right-color: #666666; border-bottom-color: #666666; border-left-color: #666666;"
														value="{$order_info_en.consignee_cellphone}">
												</div>
											</td>
										</tr>
										<tr>
											<td colspan="3">
												<div class="control-group">
													<label style="padding-top: 5px; float: left;"
														for="form-field-1">收货人地址：</label><input type="text"
														style="height: 20px; width: 800px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: none; border-right-style: none; border-bottom-style: solid; border-left-style: none; border-top-color: #666666; border-right-color: #666666; border-bottom-color: #666666; border-left-color: #666666;"
														value="{$order_info_en.total_address}">
												</div>
											</td>
										</tr>
										<tr>
											<td colspan="3">
												<div class="control-group">
													<label style="padding-top: 5px; float: left;"
														for="form-field-1">&nbsp;&nbsp;&nbsp;客户留言：</label><input
														type="text"
														style="height: 20px; width: 800px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: none; border-right-style: none; border-bottom-style: solid; border-left-style: none; border-top-color: #666666; border-right-color: #666666; border-bottom-color: #666666; border-left-color: #666666;"
														value="{$order_info_en.buyer_message}">
												</div>
											</td>
										</tr>
										<tr>
										<td colspan="3">										<div class="control-group">
										<label style="padding-top: 5px; float: left;"
														for="form-field-1">&nbsp;&nbsp;&nbsp;卖家留言：</label><input
														type="text"
														style="height: 20px; width: 800px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: none; border-right-style: none; border-bottom-style: solid; border-left-style: none; border-top-color: #666666; border-right-color: #666666; border-bottom-color: #666666; border-left-color: #666666;"
														value="{$order_info_en.seller_memo}">
												</div>
											</td>
										</tr>
									</table>

								</div>

								<div class="tools">
									<a class="btn btn-minier btn-info" href="#"> <i
										class="icon-only icon-share-alt"></i>
									</a>
								</div>
							</div>
						</div>

					</div>
				</div>



				<div class="biz_goods">
					<div class="table-header">订单详情</div>
					<div style="width: 95%; margin-left: 15px;">
						<table id="sample-table-2"
							class="table table-striped table-bordered table-hover">
							<thead>

								<tr>
									<th>原始订单编号</th>
									<th>订单编号</th>
									<th>商品编号</th>
									<th>商品名称</th>
									<th>商品款式</th>
									<th>商品数量</th>
									<th>销售价格</th>
									<th>支付金额</th>
									<th>实付金额</th>
									<th>物流单号</th>
								</tr>
							</thead>
							<tbody>

								<if condition="empty($lst_order_detail_en)">
								<td colspan="3">暂时没有数据</td>
								<else /> <volist name="lst_order_detail_en" id="details"
									empty="暂时没有数据">
								<tr>
									<td>{$details.third_order_id}</td>
									<td>{$details.order_id}</td>
									<td>{$details.third_style_id}</td>
									<td>{$details.style_name}</td>
									<td>{$details.sku_properties_name}</td>
									 <td>{$details.qty}</td>
									<td>{$details.sale_price}</td>
									<td>{$details.goods_payment_amount}</td>
									<td>{$details.divide_order_fee}</td>
									<td>{$details.logistics_no}</td>
								</tr>
								</volist> </if>
							</tbody>
						</table>
					</div>
				</div>
				<!-- 添加物流详情页 add by linyj on 2016/8/25 -->
				<div class="biz_logistics">
					<div class="table-header">物流信息</div>
					<div style="width: 95%; margin-left: 15px;">
						<table id="sample-table-2" class="table table-striped table-bordered table-hover">
							<thead>
								<tr>
								 	<th>运单号码</th>
									<th>物流公司</th> 
									<th>时间</th>
									<th>消息</th>
								</tr>
							</thead>
							<tbody>
								<if condition="empty($lst_logistics_log)">
									<td colspan="4">暂时没有数据</td>
								<else /> 
									<volist name="lst_logistics_log" id="log" empty="暂时没有数据">
										<tr>
											<td>{$log.logistics_no}</td>
											<td>{$log.logistics_company_text}</td> 
											<td>{$log.logistics_date|strtotime|date="Y-m-d",###}&nbsp;{$log.logistics_time}</td>
											<td>【{$log.logistics_person_name}】{$log.message}</td>
										</tr>
									</volist> 
								</if>
							</tbody>
						</table>
					</div>
				</div>


				<div class="biz_goods">
					<div class="table-header">服务详情</div>
					<div style="width: 95%; margin-left: 15px;">
						<table id="sample-table-2"
							class="table table-striped table-bordered table-hover">
							<thead>
								<tr>
									<th>原始订单编号</th>
									<th>订单编号</th>
									<th>服务名</th>
								</tr>
							</thead>
							<tbody>
								<if condition="empty($lst_order_server_en)">
								<tr>
									<td colspan="3">暂时没有数据</td>
								</tr>
								<else /> <volist name="lst_order_server_en" id="servers">
								<tr>
									<td>{$servers.third_order_id}</td>
									<td>{$servers.order_id}</td>
									<td>{$servers.style_name}</td>
								</tr>
								</volist> </if>

							</tbody>
						</table>
					</div>
				</div>

			</div>

		</div>
		<!--/.row-fluid-->

	</div>
	<!--/.page-content-->

</div>
<!--/.main-content--> </block>

<block name="inner_script"> <script
	src="/Public/assets/js/ace-elements.min.js"></script> <script
	src="/Public/assets/js/ace.min.js"></script> <script
	src="/Public/js/ajaxService.js"></script> <script
	src="/Public/js/project/common.js"></script>  <script
	src="/Public/js/orderdetail.js"></script>
</block>